﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using University.Workshop.Model;
using University.Workshop.Business;
using University.Workshop.Presenters;

namespace University.Workshop.WinApp
{
    public partial class showConsultation : Form, IShowConsultation
    {
        long idconsultation;
        PresenterShowConsultation presenter;

        public showConsultation(long idconsultation)
        {
            InitializeComponent();
            this.idconsultation = idconsultation;
            presenter = new PresenterShowConsultation(this);
        }

        #region Miembros de IShowConsultation

        long IShowConsultation.ConsultationId
        {
            get
            {
                return idconsultation;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion

        private void showConsultation_Load(object sender, EventArgs e)
        {
            Consultation consultation = presenter.ShowConsultation();
            label7.Text = consultation.ConsultationId.ToString(); 
            label8.Text = consultation.DoctorId;
            label9.Text = consultation.ConsultationDate;
            label17.Text = consultation.HeartRate;
            label18.Text = consultation.BloodPressure;
            label19.Text = consultation.Temperature;
            label20.Text = consultation.CurrentWeight;
            label21.Text = consultation.IdealWeight;
            label23.Text = consultation.Height;
            label10.Text = consultation.FamilyHistoryDetails;
            label11.Text = consultation.PersonalHistoryDetails;
            label25.Text = consultation.Diagnosis;
            label27.Text = consultation.Prognosis;
            label29.Text = consultation.Treatment;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
